package com.future.lock.home.entity.response;

import com.future.lock.common.http.response.HttpResponse;
import com.future.lock.home.entity.bean.LockUser;

import org.json.JSONArray;
import org.json.JSONException;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/12/28 0028.
 */

public class LockUsersResponse extends HttpResponse {

    public List<LockUser> lockUsers = new ArrayList<>();

    @Override
    protected void parseData(String dataString) throws JSONException {
        JSONArray array = new JSONArray(dataString);
        for (int i = 0; i < array.length(); i++) {
            LockUser user = new LockUser(array.optJSONObject(i));
            lockUsers.add(user);
        }
    }
}
